package org.dromara.system.domain.vo;

import org.dromara.system.domain.SysArea;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 系统管理-区域配置视图对象 sys_area
 *
 * @author LionLi
 * @date 2024-03-15
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SysArea.class)
public class SysAreaVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 区域id
     */
    @ExcelProperty(value = "区域id")
    private Long areaId;

    /**
     * 区域编号（自动生成 8位字符串，批量导入对外暴露）
     */
    @ExcelProperty(value = "区域编号", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "自=动生成,8=位字符串，批量导入对外暴露")
    private String areaCode;

    /**
     * 父区域id
     */
    @ExcelProperty(value = "父区域id")
    private Long parentId;

    /**
     * 区域名称
     */
    @ExcelProperty(value = "区域名称")
    private String areaName;

    /**
     * 类型（字典表：null 顶级系统无法删除，REGION 大区，BRAND 品牌，ORDINAR 区域，PROVINCE 省，CITY 城市，COUNTY 区县，BUSINESS_DEP 事业部，SUBSIDIARY 分子公司，REGION 大区）
     */
    @ExcelProperty(value = "类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "字=典表：null,顶=级系统无法删除，REGION,大=区，BRAND,品=牌，ORDINAR,区=域，PROVINCE,省=，CITY,城=市，COUNTY,区=县，BUSINESS_DEP,事=业部，SUBSIDIARY,分=子公司，REGION,大=区")
    private String areaType;

    /**
     * 祖级列表
     */
    @ExcelProperty(value = "祖级列表")
    private String ancestors;

    /**
     * 显示顺序
     */
    @ExcelProperty(value = "显示顺序")
    private Long orderNum;

    private List<SysStoreVo> stores;

}
